﻿<Dialogs:BaseMetroDialog xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                         xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                         xmlns:Controls="clr-namespace:MahApps.Metro.Controls"
                         xmlns:Dialogs="clr-namespace:MahApps.Metro.Controls.Dialogs"
                         x:Class="MahApps.Metro.Controls.Dialogs.LoginDialog"
                         Loaded="Dialog_Loaded">
    
    <Dialogs:BaseMetroDialog.DialogBody>
        <Grid Margin="0 10 0 0">
            <Grid.RowDefinitions>
                <RowDefinition Height="Auto"
                               MinHeight="20" />
                <RowDefinition Height="Auto" />
                <RowDefinition Height="Auto" />
                <RowDefinition Height="Auto" />
            </Grid.RowDefinitions>
            <TextBlock Grid.Row="0"
                       Margin="0 5 0 0"
                       FontSize="15"
                       Text="{Binding Message, RelativeSource={RelativeSource AncestorType=Dialogs:LoginDialog, Mode=FindAncestor}, UpdateSourceTrigger=PropertyChanged}"
                       TextWrapping="Wrap"
                       Foreground="{Binding Foreground, RelativeSource={RelativeSource AncestorType=Dialogs:LoginDialog, Mode=FindAncestor}, UpdateSourceTrigger=PropertyChanged}" />
            <TextBox Grid.Row="1"
                     Margin="0 5 0 0"
                     FontSize="15"
                     x:Name="PART_TextBox"
                     Controls:TextboxHelper.Watermark="{Binding UsernameWatermark, RelativeSource={RelativeSource AncestorType=Dialogs:LoginDialog, Mode=FindAncestor}, UpdateSourceTrigger=PropertyChanged}"
                     Text="{Binding Username, RelativeSource={RelativeSource AncestorType=Dialogs:LoginDialog, Mode=FindAncestor}, UpdateSourceTrigger=PropertyChanged}"
                     TextWrapping="Wrap"
                     Foreground="{Binding Foreground, RelativeSource={RelativeSource AncestorType=Dialogs:LoginDialog, Mode=FindAncestor}, UpdateSourceTrigger=PropertyChanged}" />
            <PasswordBox Grid.Row="2"
                         Margin="0 5 0 0"
                         FontSize="15"
                         x:Name="PART_TextBox2"
                         Controls:TextboxHelper.Watermark="{Binding PasswordWatermark, RelativeSource={RelativeSource AncestorType=Dialogs:LoginDialog, Mode=FindAncestor}, UpdateSourceTrigger=PropertyChanged}"
                         Foreground="{Binding Foreground, RelativeSource={RelativeSource AncestorType=Dialogs:LoginDialog, Mode=FindAncestor}, UpdateSourceTrigger=PropertyChanged}" />
            <StackPanel Grid.Row="3"
                        Orientation="Horizontal"
                        HorizontalAlignment="Right"
                        Height="85">
                <Button x:Name="PART_AffirmativeButton"
                        Height="35"
                        MinWidth="80"
                        Style="{DynamicResource AccentedDialogSquareButton}"
                        Content="{Binding AffirmativeButtonText, RelativeSource={RelativeSource AncestorType=Dialogs:LoginDialog, Mode=FindAncestor}, UpdateSourceTrigger=PropertyChanged}"
                        Margin="0 0 5 0" />
                <Button x:Name="PART_NegativeButton"
                        Height="35"
                        MinWidth="80"
                        Visibility="{Binding NegativeButtonButtonVisibility, RelativeSource={RelativeSource AncestorType=Dialogs:LoginDialog, Mode=FindAncestor}, UpdateSourceTrigger=PropertyChanged}"
                        Content="{Binding NegativeButtonText, RelativeSource={RelativeSource AncestorType=Dialogs:LoginDialog, Mode=FindAncestor}, UpdateSourceTrigger=PropertyChanged}"
                        Margin="5 0 5 0" />
            </StackPanel>
        </Grid>
    </Dialogs:BaseMetroDialog.DialogBody>

</Dialogs:BaseMetroDialog>